EMT Practice Test

1. Question Content...


Question List

Question1: Which one of the following SAS system options displays the time on a report?

Question2: The following SAS program is submitted:
data WORK.PRODUCTS;
Prod=1;
do while (Prod LE 7);
Prod + 1;
end;
run;
What is the value of the variable Prod in the output data set?

Question3: The SAS data set WORK STAFF has three variables:
Name is character with a length of 8

DOB is numeric with a length of 8

Start_Date is numeric with a length of 8

The following SAS program is submitted:

What is the length of the Name variable in the data set WORK STAFF_UPDATE?

Question4: The following SAS program is submitted:
data numrecords;
infile 'file specification';
input@1 patient $15.
relative$ 16-26@;
if relative = 'children' then
input @54 diagnosis $15. @;
else if relative = 'parents' then
input @28 doctor $15.
clinic $ 44-53
@54 diagnosis $15. @;
input age;
run;
How many raw data records are read during each iteration of the DATA step execution?

Question5: The following SAS program is submitted:
Data_null_;
set old;
put sales 1 sales2;
run;
Where is the output written?

Question6: The following SAS program is submitted:
data work.staff;
JobCategory = 'FA';
JobLevel = '1';
JobCategory = JobCategory || JobLevel;
run;
Which one of the following is the value of the variable JOBCATEGORY in the output data set?

Question7: The following SAS program is submitted:
data work.test;
Author = 'Christie, Agatha';
First = substr(scan(author,2,' ,'),1,1);
run;
Which one of the following is the value of the variable FIRST in the output data set?

Question8: Given the SAS data set WORK.ORDERS:

The variable order_id is numeric; customer is character; and shipped is numeric, contains a SAS date value, and is shown with the DATE9. format. A programmer would like to create a new variable, ship_note, that shows a character value with the order_id, shipped date, and customer name. For example, given the first observation ship_note would have the value "Order 9341 shipped on 02FEB2009 to Josh Martin".
Which of the following statement will correctly create the value and assign it to ship_note?

Question9: The following SAS program is submitted:
data work.sales;
do year = 1 to 5;
do month=1 to 12;
x+1;
output
end;
end;
run;
How many observations are written the WORK SALES data set?

Question10: There are 451 observations in the data set WORK.STAFF. The following SAS program is submitted:

What will be the value of NewVar when SAS writes the last observation?

Question11: This question will ask you to provide a missing option. Given the following SAS program:

Which option needs to be added to wrap the labels to the next line whenever it encounters an asterisk?

Question12: The SAS data set FED.BANKS contains a variable Open_Date which has been assigned a permanent label of "Open Date". Which SAS program temporarily replaces the label "Open Date" with the label
"Starting Date" in the output?

Question13: Which one of the following SAS system options prevents the page number from appearing on a report?

Question14: The contents of the raw data file AMOUNT are listed below:
--------10-------20-------30
$1,234
The following SAS program is submitted:
data test;
infile 'amount';
input @1 salary 6.;
if _error_ then description = 'Problems';
else description = 'No Problems';
run;
Which one of the following is the value of the DESCRIPTION variable?

Question15: Which one of the following is true of the SUM statement in a SAS DATA step program?

Question16: Given the contents of the raw data file TYPECOLOR.DAT:

The following SAS program is submitted:

What are the values of the variables Type and Color?

Question17: Consider the following data step:

The variable Count is created using a sum statement. Which statement regarding this variable is true?

Question18: The following SAS program is submitted:
data work.pieces;
do while (n lt 6);
n + 1;
end;
run;
Which one of the following is the value of the variable N in the output data set?

Question19: This question will ask you to provide a line of missing code.
Given the following data set WORK.SALES:

The following program is submitted:

Which statement should be inserted to produce the following output?

Question20: The following SAS program is submitted:

The program fails execution due to syntax errors. What is the cause of the syntax error?

Question21: The following output is created by the FREQUENCY procedure:

Which TABLES statement was used to completed the following program that produced the output?
proc freq data=sales;
<_insert_code_>
run;

Question22: Which statement describes a characteristic of the SAS automatic variable _ERROR_?

Question23: Which one of the following SAS procedures displays the data portion of a SAS data set?

Question24: The following SAS program is submitted:
proc sort data = sasuser.houses out = houses;
by style;
run;
proc print data = houses;
run;
Click on the Exhibit button to view the report produced.
style bedrooms baths price
CONDO 2 1.5 80050
3 2.5 79350
4 2.5 127150
2 2.0 110700
RANCH 2 1.0 64000
3 3.0 86650
3 1.0 89100
1 1.0 34550
SPLIT 1 1.0 65850
4 3.0 94450
3 1.5 73650
TWOSTORY 4 3.0 107250
2 1.0 55850
2 1.0 69250
4 2.5 102950
Which of the following SAS statement(s) create(s) the report?

Question25: The following SAS program is submitted:
proc print data = sasuser.houses;
run;
proc means data = sasuser.shoes;
run;
Which one of the following OPTIONS statements resets the page number to 1 for the second report?

Question26: The following SAS program is submitted:

What is produced as output?

Question27: The following program is submitted:
proc contents data=_all_;
run;
Which statement best describes the output from the submitted program?

Question28: The SASDATA.BANKS data set has five observations when the following SAS program is submitted:
libname sasdata 'SAS-data-library';
data allobs;
set sasdata.banks;
capital=0;
do year = 2000 to 2020 by 5;
capital + ((capital+2000) * rate);
output;
end;
run;
How many observations will the ALLOBS data set contain?

Question29: The following SAS program is submitted:
proc format
value score 1 - 50 = 'Fail'
51 - 100 = 'Pass';
run;
proc report data = work.courses nowd;
column exam;
define exam / display format = score.;
run;
The variable EXAM has a value of 50.5.
How will the EXAM variable value be displayed in the REPORT procedure output?

Question30: The following program is submitted:

Why does the program fail?

Question31: The SAS data set named WORK.SALARY contains 10 observations for each department, and is currently ordered by Department.
The following SAS program is submitted:

What is the value of the variable Total before the first iteration of the data step?

Question32: The following SAS program is submitted:

The SAS data set WORK.SALARY is currently ordered by Gender within Department. Which inserted code will accumulate subtotals for each Gender within Department?

Question33: Which statement correctly computes the average of four numerical values?

Question34: Given the following SAS data set WORK.EMPDATA:

Which WERE statement would display observations wit Job_Title containing the word "Manager"?

Question35: Given the SAS data set PERM.STUDENTS:
PERM.STUDENTS NAME AGE
--------- ------- Alfred 14
Alice 13
Barbara 13
Carol 14
The following SAS program is submitted:
libname perm 'SAS data library';
data students;
set perm.students;
file 'file specification';
put name $ age;
<insert statement here>
run;
The following double-spaced file is desired as output
Alfred 14
Alice 13
Barbara 13
Carol 14
Which statement completes the program and creates the desired file?

Question36: Consider the following data step:

The computed variables City and State have their values assigned using two different methods, a RETAIN statement and an Assignment statement. Which statement regarding this program is true?

Question37: The following SAS program is submitted:
data work.flights;
destination = 'cph';
select(destination);
when('LHR') city = 'London';
when('CPH') city = 'Copenhagen';
otherwise city = 'Other';
end;
run;
What is the value of the CITY variable?

Question38: The following SAS program is submitted:

What new variables are created?

Question39: The following SAS SORT procedure step generates an output data set:
proc sort data = sasuser.houses out = report;
by style;
run;
In which library is the output data set stored?

Question40: The SAS data set Fed.Banks contains a variable Open_Date which has been assigned a permanent label of "Open Date". Which SAS program temporarily replaces the label "Open Date" with the label "Starting Date" in the output?

Question41: The following SAS program is submitted:
data temp.x;
set sasuser.y;
run;
What must be submitted prior to this SAS program for the program to execute successfully?

Question42: The contents of the raw data file CALENDAR are listed below:
--------10-------20-------30
01012000
The following SAS program is submitted:
data test;
infile 'calendar';
input @1 date mmddyy10.;
if date = '01012000'd then event = 'January 1st';
run;
Which one of the following is the value of the EVENT variable?

Question43: Given the raw data file YEARAMT:
----|---10---|---20---|----30
1901 2
1905 1
1910 6
1925 .
1941 1
The following SAS program is submitted:
data coins;
infile 'yearamt';
input year quantity;
<insert statement(s) here>
run;
Which statement(s) completed the program and produced a non-missing value for the variable TOTQUANTITY in the final observation of the output data set?

Question44: The contents of the raw data file TEAM are listed below:
--------10-------20-------30
Janice 10
Henri 11
Michael 11
Susan 12
The following SAS program is submitted:
data group;
infile 'team';
input name $15. age 2.;
file 'file-specification';
put name $15. +5 age 2.;
run;
Which one of the following describes the output created?

Question45: Given the SAS data set WORK.TEMPS:

The following program is submitted:

Which output is correct?

Question46: The following SAS program is submitted:
proc contents data = sashelp.class varnum; quit;
What does the VARNUM option print?

Question47: The following SAS program is submitted:

Which statement is true about the output data set?

Question48: The following SAS program is submitted:
data work.new;
length word $7;
amount = 7;
if amount = 5 then word = 'CAT';
else if amount = 7 then word = 'DOG';
else word = 'NONE!!!';
amount = 5;
run;
Which one of the following represents the values of the AMOUNT and WORD variables?

Question49: A raw data file is listed below:
RANCH,1250,2,1,Sheppard Avenue,"$64,000"
SPLIT,1190,1,1,Rand Street,"$65,850"
CONDO,1400,2,1.5,Market Street,"80,050"
TWOSTORY,1810,4,3,Garris Street,"$107,250"
RANCH,1500,3,3,Kemble Avenue,"$86,650"
SPLIT,1615,4,3,West Drive,"94,450"
SPLIT,1305,3,1.5,Graham Avenue,"$73,650"
The following SAS program is submitted using the raw data file as input:
data work.condo_ranch;
infile 'file-specification' dsd;
input style $ @;
if style = 'CONDO' or style = 'RANCH' then
input sqfeet bedrooms baths street $ price : dollar10.;
run;
How many observations does the WORK.CONDO_RANCH data set contain?

Question50: Given the AIRPLANES data set
AlRPLANES
TYPE MPG
-------- ------
F-18 105
C-130 25
Harrier 75
A-6 110
The following SAS program is submitted:
data gt100;
set airplanes(keep = type mpg load);
load = mpg * 150;
run;
The program fails to execute due to syntax errors.
What is the cause of the syntax error?

Question51: The following SAS program is submitted:
data work.clients;
calls = 6;
do while (calls le 6);
calls + 1;
end;
run;
Which one of the following is the value of the variable CALLS in the output data set?

Question52: The following SAS program is submitted:

What is the initial value of the variable Total in the following program?

Question53: The following SAS program is submitted:
data work.test;
First = 'Ipswich, England';
City = substr(First,1,7);
City_Country = City!!', '!!'England';
run;
Which one of the following is the value of the variable CITY_COUNTRY in the output data set?

Question54: The following SAS program is submitted:
data work.new;
mon = 3;
day = 23;
year = 2000;
date = mdy(mon,day,year);
run;
Which one of the following is the value of the DATE variable?

Question55: This question will ask you to provide lines of missing code.
The following SAS program is submitted:

Which statement inserted, respectively, in the two locations indicated above create a report stored in a PDF file?
A:

B:

C:

D:

Question56: Given the SAS data set PRICES:
PRICES
prodid price
K12S 5.10 producttype
NETWORK sales
15 returns
2
B132S 2.34 HARDWARE 300 10
R18KY21.29 SOFTWARE 25 5
3KL8BY 6.37 HARDWARE 125 15
DY65DW 5.60 HARDWARE 45 5
DGTY23 4.55 HARDWARE 67 2
The following SAS program is submitted:
data hware inter soft;
set prices (keep = producttype price);
if price le 5.00;
if producttype = 'HARDWARE' then output HWARE;
else if producttype = 'NETWORK' then output INTER;
else if producttype = 'SOFTWARE' then output SOFT;
run;
How many observations does the HWARE data set contain?

Question57: The Excel workbook REGIONS.XLS contains the following four worksheets:
EAST
WEST
NORTH
SOUTH
The following program is submitted:
libname MYXLS 'regions.xls';
Which PROC PRINT step correctly displays the NORTH worksheet?

Question58: The following SAS program is submitted:
libname rawdata1 'location of SAS data library';
filename rawdata2 'location of raw data file';
data work.testdata;
infile
input sales1 sales2;
run;
Which one of the following is needed to complete the program correctly?

Question59: The following SAS program is submitted:
data work.january;
set work.allmonths (keep = product month num_sold cost);
if month = 'Jan' then output work.january;
sales = cost * num_sold;
keep = product sales;
run;
Which variables does the WORK.JANUARY data set contain?

Question60: The following SAS program is submitted:
data work.products;
Product_Number = 5461;
Item = '1001';
Item_Reference = Item'/'Product_Number;
run;
Which one of the following is the value of the variable ITEM_REFERENCE in the output data set?

Question61: Given the following code:
proc print data=SASHELP.CLASS(firstobs=5 obs=15);
where Sex='M';
run;
How many observations will be displayed?

Question62: After a SAS program is submitted, the following is written to the SAS log:
105 data january;
106 set allmonths(keep = product month num_sold cost);
107 if month = 'Jan' then output january;
108 sales = cost * num_sold;
109 keep = product sales;
------
22
ERROR 22-322: Syntax error, expecting one of the following:!,
!!, &, *,**, +, -,/, <,< =, <>, =, >, ><, >=,
AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL,
NOTIN, OR,^=,|,II,
110 run;
What changes should be made to the KEEP statement to correct the errors in the LOG?

Question63: Given the SAS data set ONE:
Given the SAS data set WORK.ONE:

The following SAS program is submitted:

Which report is produced?

Question64: A SAS PRINT procedure output of the WORK.LEVELS data set is listed below:
Obs name level
1 Frank 1
2 Joan 2
3 Sui 2
4 Jose 3
5 Burt 4
6 Kelly .
7 Juan 1
The following SAS program is submitted:
data work.expertise;
set work.levels;
if level = . then
expertise = 'Unknown';
else if level = 1 then
expertise = 'Low';
else if level = 2 or 3 then
expertise = 'Medium';
else
expertise = 'High';
run;
Which of the following values does the variable EXPERTISE contain?

Question65: The following SAS program is submitted:

How will the Exam variable value be displayed in the FREQ procedure output?

Question66: The following SAS program is submitted:
data stats;
set revenue;
array weekly{5} mon tue wed thu fri;
total = weekly{i} * .25;
output;
end;
run;
Which one of the following DO statements completes the program and processes the elements of the WEEKLY array?

Question67: Given the SAS data set WORK.ONE:

What value will SAS assign to Total?

Question68: Given the SAS data set WORK.ORDERS:

Ship_date is a numeric variable containing a SAS data value. A programmer would like to create a new character variable Ship_date-char that represents the ship date as a character string, such as "February
2,2009'
Which statement will create the new variable Ship_date_char as a character value with a format such as
"February 2, 2009"?

Question69: The following SAS program is submitted:

If the value for the Alumcode is: ALUM2, what is the value of the variable Description?

Question70: The following SAS DATA step is submitted:
data work.accounting;
set work.department;
length jobcode $ 12;
run;
The WORK.DEPARTMENT SAS data set contains a character variable named JOBCODE with a length of
5. Which one of the following is the length of the variable JOBCODE in the output data set?

Question71: By default, which variables and data values are used to calculate statistics in the MEANS procedure?

Question72: The contents of the SAS data set PERM.JAN_SALES are listed below:
VARIABLE NAME TYPE
idnum character variable
sales_date numeric date value
A comma delimited raw data file needs to be created from the PERM.JAN_SALES data set. The SALES_DATE values need to be in a MMDDYY10 form.
Which one of the following SAS DATA steps correctly creates this raw data file?

Question73: Which one of the following is true of the RETAIN statement in a SAS DATA step program?

Question74: The SAS data set WORK.ONE contains a numeric variable named Num and a character variable named Char:

The following SAS program is submitted:

What is output?

Question75: Given the SAS data set WORK.ORDERS:

The variable Order_id is numeric; Customer is character; and Ship_date is a numeric containing a SAS date value.
A programmer would like to create a new variable called Note, that shows a character value with the Order_id and Ship_date shown with a date9. format. For the first observation, Note would look like the following: "Order 9341 shipped on 02FEB2009".
Which of the following statement will correctly create the value and assign it to Note?

Question76: The value 110700 is stored in a numeric variable named SALARY.
Which FORMAT statement displays the value as $110,700.00 in a report?

Question77: After a SAS program is submitted, the following is written to the SAS log:
105 data WORK.JANUARY;
106 set WORK.ALLYEAR(keep=Product Month Quantity Cost);
107 if Month='JAN' then output WORK.JANUARY;
108 Sales=Cost * Quantity;
109 drop=Month Quantity Cost;
-----
22
ERROR 22-322: Syntax error, expecting one of the following: !,
!!, , *, **, +, -,
,<=, <>, =, >, >=,
AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL,
NOTIN, OR, ^=, |, ||, ~=.
110 run;
What data set option could be attached to WORK.JANUARY to replace the DROP statement that generated the error in the log?

Question78: The following SAS program is submitted:
data one;
date = '04juI2005'd;
format date weekdate.; run;
proc print data = one; run;
What output is generated?

Question79: The following SAS program is submitted:
data work.test;
Author = 'Agatha Christie';
First = substr(scan(author,1,' ,'),1,1);
run;
Which one of the following is the length of the variable FIRST in the output data set?

Question80: The following SAS program is submitted:
data work.test;
set work.staff (keep = jansales febsales marsales);
array diff_sales{3} difsales1 - difsales3;
array monthly{3} jansales febsales marsales;
run;
What new variables are created?

Question81: A raw data file is listed below:
--------10-------20-------30
squash 1.10
apples 2.25
juice 1.69
The following SAS program is submitted using the raw data file above:
data groceries;
infile 'file-specification';
input item $ cost;
run;
Which one of the following completes the program and produces a grand total for all COST values?

Question82: Given the following raw data records in TEXTFILE.TXT:

The following output is desired:

Which SAS program correctly produces the desired output?

Question83: The following SAS program is submitted:
data work.totalsales (keep = monthsales{12} );
set work.monthlysales (keep = year product sales);
array monthsales {12} ;
do i=1 to 12;
monthsales{i} = sales;
end;
run;
The data set named WORK.MONTHLYSALES has one observation per month for each of five years for a total of 60 observations.
Which one of the following is the result of the above program?

Question84: Given the SAS data set AGES:
AGES
AGE
---------
The variable AGE contains character values. The following SAS program is submitted:
data subset;
set ages;
where age> 12;
run;
How many observations are written out to the data set SUBSET?

Question85: Given the SAS data set SASDATA TWO:
SASDATA TWO
X Y
-- --
5 2
3 1
5 6
The following SAS program is submitted:
data sasuser.one two sasdata.three;
set sasdata two;
if x = 5 then output sasuser.one;
else output sasdata two;
run;
What is the result?

Question86: Given the raw data file EMPLOYEE.TXT:

The following SAS program is submitted:

What value does the variable idnum contain when the name of the employee is "Ruth"?

Question87: The following SAS program is submitted:
data work.month;
date = input('13mar2000',date9.);
run;
Which one of the following represents the type and length of the variable DATE in the output data set?

Question88: Which is a valid LIBNAME statement?

Question89: Given the SAS data set WORKAWARDS:
WORK.AWARDS
FNAME POINTS MONTH
----------- ------------ -----------
Amy 2 4
Amy 1 7
Gerard 3 3
Wang 3 3
Wang 1 12
Wang 1 8
The following SAS program is submitted:
proc sort data = work.awards;
by descending fname points;
run;
How are the observations sorted?

Question90: The SAS data set WORK.AWARDS is listed below:
fname points
Amy 2
Amy 1
Gerard 3
Wang 3
Wang 1
Wang 2
The following SAS program is submitted:
proc sort data = work.awards;
by descending fname points;
run;
Which one of the following represents how the observations are sorted?

Question91: The following program is submitted:
proc contents data=_all_;
Which statement best describes the output from the submitted program?

Question92: The following SAS program is submitted:

Which statement is true about the output data set?

Question93: Which ODS statement option terminates output being written to an HTML rile?

Question94: Population is currently at 34,278,400 for country A and is expected to rise at a rate of 2%.
Which DO LOOP will correctly calculate growth rate over the next 10 years beginning in 2012 as shown in the graphic below?

A:

B:

C:

D:

Question95: The following SAS program is submitted:

What types of variables are DayOfMonth, MonthOfYear, and Year?

Question96: The following SAS program is submitted:
data test;
set sasuser.employees;
if 2 le years_service le 10 then
amount = 1000;
else amount = 0;
amount_per_year = years_service / amount
run;
What is the value of the variable AMOUNT_PER_YEAR if an employee has been with the company for one year?

Question97: Given the raw data file AMOUNT:
----I---- 10---I----20---I----30
$1,234
The following SAS program is submitted:
data test;
infile 'amount';
input@1 salary 6.;
if_error_then description = 'Problems';
else description = 'No Problems';
run;
What is the result?

Question98: Given the following data set WORK.TOYS:

The following SAS program s submitted:
data WORK.GROUPS;
set WORK.TOYS;
if Product="Cards" then Group_Desc="Indoors";
else if Product in ("Drum", "Recorder") then Group_Desc="Instruments";
else if Product="Ball" then Group_Desc="Outdoors";
run;
proc print data=WORK.GROUPS noobs;
run;
Which output is produced?
A:

B:

C:

D:

Question99: On which portion(s) of a SAS data set does the PRINT procedure report?

Question100: Which of the following choices is an unacceptable ODS destination for producing output that can be viewed in Microsoft Excel?

Question101: The following SAS program is submitted:

How many observations are written to the WORK.SALES data set?

Question102: The following SAS program is submitted:
proc freq data = class;
tables gender * age / <insert option here>;
run;
The following report is created:
The FREQ Procedure
Table of gender by age
Row Column
Gender age Frequency Percent Percent Percent
F 11 1 10.00 20.00 50.00
12 2 20.00 40.00 40.00
13 2 20.00 40.00 66.67
Total 5 50.00 100.00
M 11 1 10.00 20.00 50.00
12 3 30.00 60.00 60,00
13 1 10.00 20.00 33.33
Total 5 50.00 100.00
Total 11 2 20.00 100.00
12 5 50.00 100.00
13 3 30.00 100.00
Total 10 100.00
Which option correctly completes the program and creates the report?

Question103: The following SAS program is submitted:
data work.total;
set work.salary(keep = department wagerate);
by department;
if first.department
then payroll = 0;
payroll + wagerate;
if last.department;
run;
The SAS data set named WORKSALARY contains 10 observations for each department, and is currently ordered by DEPARTMENT.
Which statement is true?

Question104: When the following SAS program is submitted, the data set SASDATA.PRDSALES contains 5000 observations:
libname sasdata 'SAS-data-library';
options obs = 500;
proc print data = sasdata.prdsales (firstobs = 100);
run;
options obs = max;
proc means data = sasdata.prdsales (firstobs = 500);
run;
How many observations are processed by each procedure?

Question105: The following SAS program is submitted;
data combine;
country = 'Italy, Russia, ireland';
found = find(country, 'i');
run;
What is the value of the variable FOUND in the output data set?

Question106: The following SAS program is submitted:
data work.test;
array agents{4} $ 12 sales1 - sales4;
run;
Which one of the following represents the variables that are contained in the output data set?

Question107: The SAS data set PETS is sorted by the variables TYPE and BREED.
The following SAS program is submitted:
proc print data = pets;
var type breed;
sum number;
run;
What is the result?

Question108: The following SAS program is submitted:

What are the values of the Amount and Word variables in SAS dataset WORK.NEW?

Question109: The following SAS program is submitted:

What will the data set WORK.TEST contain?

Question110: The following SAS program is submitted:
data work.passengers;
if OrigPassengers = . then'
OrigPassengers = 100;
TransPassengers = 100;
OrigPassengers = .;
TotalPassengers = sum (OrigPassengers, TransPassengers) +0;
run;
What is the value of the TOTALPASSENGERS variable in the output data set?

Question111: The SAS data sets WORK.EMPLOYEE and WORK.SALARY are shown below:
WORK.EMPLOYEE WORK.SALARY
fname age name salary
Bruce 30 Bruce 25000
Dan 40 Bruce 35000
Dan 25000
The following SAS program is submitted:
data work.empdata;
by fname;
totsal + salary;
run;
Which one of the following statements completes the merge of the two data sets by the FNAME variable?

Question112: The following SAS program is submitted:
proc sort data=SASUSER.PROJECTS out=PSORT;
by Product Code descending Date Cost;
run;
Which of the following is true concerning the submitted program?

Question113: Given the following IF/THEN statement:
If Age NE 16 and Age NE 15 then Group=1;
Which assignment statement for variable Group is functionally equivalent to the original statement used in the above data step?

Question114: The following SAS program is submitted:

What is the value of the second variable in the data set WORK.AUTHORS?

Question115: The following SAS program is submitted:
data work.test;
First = 'Ipswich, England';
City_Country = substr(First,1,7)!!', '!!'England';
run;
Which one of the following is the length of the variable CITY_COUNTRY in the output data set?

Question116: The following SAS program is submitted:
data ONE TWO SASUSER.TWO
set SASUSER.ONE;
run;
Assuming that SASUSER.ONE exists, how many temporary and permanent SAS data sets are created?

Question117: The SAS data set WORK.ONE contains a numeric variable named Num and a character variable named Char:

The following SAS program is submitted:
proc print data=WORK.ONE;
where Num=contains (1);
run;
Which output is generated?

Question118: A raw data record is listed below:
--------10-------20-------30
1999/10/25
The following SAS program is submitted:
data projectduration;
infile 'file-specification';
input date $ 1 - 10;
run;
Which one of the following statements completes the program above and computes the duration of the project in days as of today's date?

Question119: Given the raw data file EMPLOYEE:
----I----1 0---I----20---I----30
Ruth 39 11
Jose 32 22
Sue 30 33
John 40 44
The following SAS program is submitted:
data test;
infile 'employee';
input employee_name $ 1-4;
if employee_name = 'Ruth' then input idnum 10-11;
else input age 7-8;
run;
What value does the variable IDNUM contain when the name of the employee is "Ruth"?

Question120: What is the purpose or the MISSOVER option on the INFILE statement?

Question121: The following SAS program is submitted:
data WORK.AUTHORS;
array Favorites{3} $ 8 ('Shakespeare','Hemingway','McCaffrey');
run;
What is the value of the second variable in the dataset WORK.AUTHORS?

Question122: You're attempting to read a raw data file and you see the following messages displayed in the SAS Log:

What does it mean?

Question123: Consider the data step:

Which of the following assignment statements for variable group are functionally equivalent to the original statement used in the above data step?

Question124: The SAS data set named WORK.TEST is listed below:
capacity airplanetype staff
150 Large 10
Which one of the following SAS programs created this data set?

Question125: After a SAS program is submitted, the following is written to the SAS log:

What changes should be made to the KEEP statement to correct the errors in the LOG?

Question126: Given the SAS data set WORK.PRODUCTS:

How many variables does the WORK.REVENUE data set contain?

Question127: Given the contents of the raw data file TYPECOLOR:
----I----10---I----20---I----30
Daisyyellow
The following SAS program is submitted:
data flowers;
infile 'typecolor';
input type$ 1-5+1 color$;
run;
What are the values of the variables TYPE and COLOR?

Question128: This questions will ask you to provide two missing variable names.
The following SAS program is submitted:
data WORK.TOTAL;
set WORK.SALARY;
by Department Gender;
if First. <insert variable 1 here> then Payroll=0
Payroll+Wagerate;
if Last.<insert variable 2 here>;
run;
The SAS data set WORK.SALARY is currently ordered by Gender within Department. Which inserted code will accumulate subtotals for each Gender within Department?

Question129: The contents of the raw data file PRODUCT are listed below:
--------10-------20-------30
24613 $25.31
The following SAS program is submitted:
data inventory;
infile 'product';
input idnum 5. @10 price;
run;
Which one of the following is the value of the PRICE variable?

Question130: The following SAS program is submitted:

If the value for the variable Jobcode is: PILOT2, what is the value of the variable Description?

Question131: Given the SAS data set PEPM.STUDENTS:
PERM.STUDENTS NAME AGE
--------- ------ Alfred 14
Alice13
Barbara13
Carol14
The following SAS program is submitted:
libname perm 'SAS data library';
data students;
set perm.students;
file 'file specification';
put name $15. @5 age 2.;
run;
What is written to the output raw data file?

Question132: The following SAS program is submitted:
data test;
infile 'file specification';
input name $ amount@@;
run;
Which of the following is true?

Question133: The following SAS program is submitted:
data work.month;
date = put('13mar2000'd,ddmmyy10.);
run;
Which one of the following represents the type and length of the variable DATE in the output data set?

Question134: The SAS data sets WORK.EMPLOYEE and WORK.SALARY are listed below:
WORK.EMPLOYEE WORK.SALARY
fname age fname salary
Bruce 30 Bruce 25000
Dan 40 Bruce 35000
Dan 25000
The following SAS program is submitted:
data work.empdata;
merge work.employee
work.salary;
by fname;
totsal + salary;
run;
How many variables are output to the WORK.EMPDATA data set?

Question135: The following SAS program is submitted:

What is the value of the variable Prod in the output data set?

Question136: The following SAS program is submitted:
data allobs;
set sasdata.origin (firstobs = 75 obs = 499);
run;
The SAS data set SASDATA.ORIGIN contains 1000 observations.
How many observations does the ALLOBS data set contain?

Question137: The following SAS program is submitted:
data work.report;
set work.sales_info;
if qtr(sales_date) ge 3;
run;
The SAS data set WORK.SALES_INFO has one observation for each month in the year 2000 and the variable SALES_DATE which contains a SAS date value for each of the twelve months.
How many of the original twelve observations in WORK.SALES_INFO are written to the WORK.REPORT data set?

Question138: The SAS data set EMPLOYEE_INFO is listed below:
IDNumber Expenses
2542 100.00
3612 133.15
2198 234.34
2198 111.12
The following SAS program is submitted:
proc sort data = employee_info;
run;
Which one of the following BY statements completes the program and sorts the data sequentially by descending expense values within each descending IDNUMBER value?

Question139: The following SAS program is submitted:
proc contents data = sasuser.airplanes;
run;
Which one of the following is produced as output?

Question140: The following output is created by the FREQUENCY procedure:

Which TABLES option(s) would be used to eliminate the row and column counts and just see the frequencies and percents?

Question141: The Excel workbook REGIONS.XLSX contains the following four worksheets:
EAST
WEST
NORTH
SOUTH
The following program is submitted:
libname MYXLS XLSX 'c:\ data\ regions.xlsx';
Which PROC PRINT step correctly displays the NORTH worksheet?

Question142: Given the raw data record in the file phone.txt:

Which SAS statement completes the program and results in a value of "James Stevens" for the variableFullName?

Question143: Given the contents of the raw data file EMPLOYEE:
----|----10----|----20----|----30
Alan 19/2/2004 ACCT
Rob 22/5/2004 MKTG
MaryJane 14/3/2004 EDUC
The following SAS program is submitted:
data emps;
infile 'employee';
input@1 name$
@ 15 date <insert INFORMAT here>
@ 25 department$;
run;
Which INFORMAT correctly completes the program?

Question144: The following SAS program is submitted:
data work.test;
Title = 'A Tale of Two Cities, Charles J.
Dickens';
Word = scan(title,3,' ,');
run;
Which one of the following is the value of the variable WORD in the output data set?

Question145: Which one of the following is true when SAS encounters a data error in a DATA step?

Question146: Given the SAS data set WORK.ONE:

The following SAS program is submitted:

The data set WORK.TWO is created, where Day would be 1 for Sunday, 2 for Monday, 3 for Tuesday, ... :

Which expression successfully completed the program and creates the variable DAY?

Question147: The following SAS program is submitted:
options pageno = 1;
proc print data = sasuser.houses;
run;
proc means data = sasuser.shoes;
run;
The report created by the PRINT procedure step generates 5 pages of output.
What is the page number on the first page of the report generated by the MEANS procedure step?

Question148: The following SAS program is submitted:
libname temp 'SAS data library';
data work.new;
set temp.jobs;
format newdate mmddw10.;
mdate = month(newdate);
ddate = weekday(newdate);
run;
proc print data = work.new; run;
The variable NEWDATE contains the SAS date value for April 15. 2005. What output is produced if April
15, 2005 falls on a Friday?

Question149: Read the table:

Given the SAS data set SASUSER.HOUSES:
Obs style bedrooms baths price sqteet street
1 CONDO 2 1.5 80050 1200 MAIN
2 CONDO 3 2.5 79350 1300 ELM
3 CONDO 4 2.5 127150 1400 OAK
4 CONDO 2 2.0 110700 1100 FIFTH
5 TWOSTORY 4 3.0 107250 2100 SECOND
6 TWOSTORY 2 1.0 55650 1600 WEST
7 TWOSTORY 2 1.0 69250 1450 NORTH
6 TWOSTORY 4 2.5 102950 2000 SOUTH
The following SAS program is submitted:
proc report data = sasuser.houses nowd headline;
column style price;
where price It 100000;
<insert DEFINE statement here>
define price / mean width = 9 format = dollar12.;
title;
run;
The following output is desired:
style price
------- ------
CONDO $79,700
TWOSTORY $62550
Which DEFINE statement completes the program and produces the desired output?

Question150: The following SAS program is submitted and reads 100 records from a raw data file:
data work.total;
infile 'file-specification' end = eof;
input name $ salary;
totsal + salary;
run;
Which one of the following IF statements writes the last observation to the output data set?

Question151: The following SAS program is submitted:
libname company 'SAS-data-library';
proc sort data = company.payroll;
by EmployeeIDNumber;
run;
Write access has been granted to the COMPANY library.
Which one of the following represents how the observations are sorted?